package com.fei.wechat.common.model.vo;

import java.io.Serializable;
import java.util.Date;

/**
 * 描述: 控制层方法返回到前端VO类
 * 版权: Copyright (c) 2018 
 * 公司: 飞翔科技 
 * 作者: 张进飞 
 * 版本: 1.0 
 * 创建日期: 2018年4月22日 
 * 创建时间: 下午8:29:21
 */
public class RespVo implements Serializable
{
    
    /**
     * 
     */
    private static final long serialVersionUID = 8341654184721022008L;
    
    /**
     * 状态码 0:成功
     */
    private int code = CODE_SUCCESS; // 处理状态
    
    /**
     * 失败
     */
    public static final int CODE_ERROR = -1;
    
    /**
     * 参数校验失败
     */
    public static final int VALIDATE_ERROR = 1;
    
    /**
     * 成功
     */
    public static final int CODE_SUCCESS = 0;
    
    /**
     * 其他状态
     */
    public static final int CODE_OTHER = 2;
    
    /**
     * 验证码失败
     */
    public static final int CODE_VERIFY = 3;
    
    /**
     * 密码错误
     */
    public static final int PASSWORD_ERROR = 4;
    
    /**
     * 消息
     */
    private String message = "SUCCESS"; // 返回信息
    
    private Object result;
    
    /**
     * 操作日志模板，参数
     */
    private Object[] logArgs;
    
    /**
     * 操作日志描述详情
     */
    private String logDetails;
    
    // 执行方法运行的时间
    private String runTime = new Date().toString();
    
    public RespVo()
    {
        super();
    }
    
    public RespVo(int code, String message)
    {
        this.code = code;
        this.message = message;
    }
    
    public RespVo(int code, String message, Object result)
    {
        this.code = code;
        this.message = message;
        this.result = result;
    }
    
    public RespVo(Object result)
    {
        this.result = result;
    }
    
    public int getCode()
    {
        return code;
    }
    
    public void setCode(int code)
    {
        this.code = code;
    }
    
    public String getMessage()
    {
        return message;
    }
    
    public void setMessage(String message)
    {
        this.message = message;
    }
    
    public Object getResult()
    {
        return result;
    }
    
    public void setResult(Object result)
    {
        this.result = result;
    }
    
    public String getRunTime()
    {
        return runTime;
    }
    
    public void setRunTime(String runTime)
    {
        this.runTime = runTime;
    }
    
    public String getLogDetails()
    {
        return logDetails;
    }
    
    public void setLogDetails(String logDetails)
    {
        this.logDetails = logDetails;
    }
    
    public Object[] getLogArgs()
    {
        return logArgs;
    }
    
    public void setLogArgs(Object[] logArgs)
    {
        this.logArgs = logArgs;
    }
    
}
